package com.example.bbbb.funIn;

import java.util.function.Predicate;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ws
 * Date: 2023-12-15
 * Time: 13:48
 */
public class Predi {
    public static void main(String[] args) {
        // 断定型接口
//        Predicate<Person> predicate = new Predicate<Person>() {
//            @Override
//            public boolean test(Person person) {
//                return false;
//            }
//        };

        Predicate<Person> predicate = (person) -> {
            return person.name.equals("张三");
        };


        System.out.println(predicate.test(new Person()));
    }
}
